home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!devmaccn.demon.co.uk
- From: Alan Griffiths <aGriffiths@ma.ccngroup.com>
- Newsgroups: comp.lang.c++
- Subject: Re: Templates as the type of a template
- Date: Wed, 17 Apr 1996 17:22:13 GMT
- Organization: CCN Market Analysis
- Distribution: world
- Message-ID: <493104333wnr@ma.ccngroup.com>
- References: <316D1587.167EB0E7@kainos.com>
- Reply-To: aGriffiths@ma.ccngroup.com
- X-NNTP-Posting-Host: devmaccn.demon.co.uk
- X-Broken-Date: Wednesday, Apr 17, 1996 17.22.13 GMT
- X-Newsreader: Newswin Alpha 0.6
- X-Mail2News-Path: devmaccn.demon.co.uk
-
- In article: <316D1587.167EB0E7@kainos.com> Andrew Palmer <a.palmer@kainos.com> writes:
- >
- > Hello,
- >
- > I'm using Sun's CC compiler from Sparcworks 3.0.1 and I'm having a
- > little trouble passing a template class as the type of another template
- > class.
- >
- > I have one template class called "list" and I can use "list<int> foo"
- > fine.
- > I have another template class called "vector" and I can use
- > "vector<int> bar;" fine as well.
- >
- > But I don't seem to be able to have a list of vectors of type int,
- > e.g. "list<vector<int>> foobar;" doesn't work.
-
- C++ syntax requires a whitespace. vis: "list<vector<int> >"
-
- >
- > I can get round the problem by "typedef vector<int> iVector;
- > list<iVector> foobar;"
- >
- > Am I doing something wrong in the syntax or is it just one of those
- > things that doesn't work?
-
- Can't speak for your compiler.
-
-
- Alan Griffiths | Also editor of: The ISDF Newsletter
- Senior Systems Consultant, | (An Association of C and C++ Users publication)
- CCN Group Limited. | (ISDF editor : isdf@octopull.demon.co.uk)
- (agriffiths@ma.ccngroup.com) | (For ACCU see : http://bach.cis.temple.edu/accu)
-
-